/**
 * 
 */
package design_pattern.singleton;

/**
 * 饿汉式单例模式
 * 
 * @author Administrator
 * 
 */
public class EagerSingleton {

  // 最终的变量
  private static final EagerSingleton eager = new EagerSingleton();

  // 私有的构造函数
  private EagerSingleton() {}

  public static EagerSingleton getInstance() {
    return eager;
  }
}
